export interface PaginationParameter {
  current?: number,
  pageSize?: number,
  refreshing?: boolean,
  increasing?: boolean,
  [key: string]: any
}

/**
 * 基础分页信息结构
 */
export interface PaginationBase {
  current: number;
  pageSize?: number;
  lastPage?: boolean;
  total?: number;
}

/**
 * api 请求中返回的数据结果
 */
export interface Pagination<T> extends PaginationBase {
  list: T[]
}

/**
 * 存储在自定义 hook 中的分页数据格式
 * */
export interface PaginationState<T> extends Pagination<T>{
  increasing: boolean,
  loading: boolean, /* initial loading */
  refreshing: boolean,
  errMsg: string
}

export const parameter: PaginationParameter = {
  current: 1,
  pageSize: 10
}
